<!-- 主页 -->
<template>
	<view>
		<!-- 头部背景 -->
		<view class="headCss">
			<view style="display: flex; align-items: center;">
				<view class="avatar">
					<image
						src="https://ts2.tc.mm.bing.net/th?id=ORMS.0005b9e6a5501bc8479862377af0978c&pid=Wdp&w=268&h=140&qlt=90&c=1&rs=1&dpr=1.75&p=0"
						mode="aspectFill"></image>
				</view>
				<view class="name">
					大美汽修厂，欢迎您
				</view>
			</view>
		</view>

		<!-- 控制面板 -->
		<view class="headText">
			<view class="headDiv">
				<view class="saoma" @click="toSaoMa()">
					<image src="/static/images/扫码 (2).png" mode=""></image>
					<view class="name2">
						扫码核销
					</view>
				</view>
				<view class="saoma" @click="toInputCode()">
					<image src="/static/images/输入2.png" mode=""></image>
					<view class="name2">
						输入核销码
					</view>
				</view>
			</view>
		</view>

		<view class="headText" style="margin-top: 20rpx;">
			<!-- 第一行数据 -->
			<view class="iconItems">

				<!-- 经营统计 -->
				<view class="iconItem" @click="toBusinessCount()">
					<view class="iconImg">
						<image src="/static/images/统计.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							经营统计
						</view>
					</uni-badge>
				</view>

				<!-- 核销记录 -->
				<view class="iconItem" @click="toVerifyRecord()">
					<view class="iconImg" style="background-color: #ff9f4f;">
						<image src="/static/images/核销记录 (1).png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							核销记录
						</view>
					</uni-badge>
				</view>

				<!-- 收支明细 -->
				<view class="iconItem" @click="toBalanceDetails()">
					<view class="iconImg" style="background-color: #6da7ff;">
						<image src="/static/images/123收支明细.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							收支明细
						</view>
					</uni-badge>
				</view>

				<!-- 订单管理 -->
				<view class="iconItem" @click="toOrderlist()">
					<view class="iconImg" style="background-color: #ffc600;">
						<image src="/static/images/订单管理.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							订单管理
						</view>
					</uni-badge>
				</view>

			</view>

			<!-- 第二行数据 -->
			<view class="iconItems">

				<!-- 卡券管理 -->
				<view class="iconItem"  @click="toCouponManagement">
					<view class="iconImg" style="background-color: #4a89ff;">
						<image src="/static/images/卡券.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							卡券管理
						</view>
					</uni-badge>
				</view>

				<!-- 维修任务 -->
				<view class="iconItem" @click="toMaintenancetask()">
					<view class="iconImg" style="background-color: #00de9b;">
						<image src="/static/images/维修.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							维修任务
						</view>
					</uni-badge>
				</view>

				<!-- 评价管理 -->
				<view class="iconItem">
					<view class="iconImg" style="background-color: #fe5d5c;">
						<image src="/static/images/评价管理.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							评价管理
						</view>
					</uni-badge>
				</view>

				<!-- 商户资料 -->
				<view class="iconItem">
					<view class="iconImg" style="background-color: #0fb5ff;">
						<image src="/static/images/资料库.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							商户资料
						</view>
					</uni-badge>
				</view>

			</view>

			<!-- 第三行数据 -->
			<view class="iconItems">
				<view class="iconItem" style="margin-left: 20rpx;">
					<view class="iconImg" style="background-color: #ff9347;">
						<image src="/static/images/活动.png" mode=""></image>
					</view>
					<uni-badge class="uni-badge-left-margin iconText" :text="value" absolute="rightTop" size="small">
						<view>
							活动发布
						</view>
					</uni-badge>
				</view>
			</view>
		</view>

		<view class="headText" style="margin-top: 20rpx;">
			<view class="buttomText">
				<view class="butLeft">
					<image src="/static/images/消息-信息.png" mode=""></image>最新通知
				</view>
				<view class="butRight">
					今日需上门取车任务共32单 >
				</view>
			</view>

			<!-- 分割线 -->
			<view class="div-line" />

			<!-- 通知 -->
			<view class="message">
				<view class="">
					用户
				</view>
				<view class="">
					服务项目
				</view>
				<view class="">
					时间
				</view>
			</view>

			<view class="msg">
				<view class="">
					张先生
				</view>
				<view class="">
					汽车美容、基础保养
				</view>
				<view class="">
					2025-01-01 10:00:30
				</view>
			</view>

			<view class="msg">
				<view class="">
					张先生
				</view>
				<view class="">
					汽车美容、基础保养
				</view>
				<view class="">
					2025-01-01 10:00:30
				</view>
			</view>
			<view class="msg">
				<view class="">
					张先生
				</view>
				<view class="">
					汽车美容、基础保养
				</view>
				<view class="">
					2025-01-01 10:00:30
				</view>
			</view>





		</view>





	</view>
</template>

<script>
	export default {
		data() {
			return {
				value: 12
			}
		},
		methods: {
			toSaoMa() {
				uni.navigateTo({
					// 扫码核销
					url: "/pages/verifyItem/scanCode/scanCode"
				})
			},
			toInputCode() {
				uni.navigateTo({
					// 输入核销码
					url: "/pages/verifyItem/inputCode/inputCode"
				})
			},
			toCouponManagement(){
				uni.navigateTo({
					// 输入核销码
					url: "/pages/couponManage/couponManagement/couponManagement"
				})
			},
			toBusinessCount(){
				uni.navigateTo({
					// 经营统计
					url:'/pages/ledgerView/businessCount/businessCount'
				})
			},
			toVerifyRecord(){
					// 核销记录
				uni.navigateTo({
					url:'/pages/verifyItem/verifyRecord/verifyRecord'
				})
			},
			
			toBalanceDetails(){
					// 收支明细
				uni.navigateTo({
					url:'/pages/ledgerView/balanceDetails/balanceDetails'
				})
			},
			toOrderlist(){
					// 订单管理
				uni.navigateTo({
					url:'/pages/order-mangement/orderlist/orderlist'
				})
			},
			
			
			
			
			// toVerifyRecord(){
			// 		// 卡券管理
			// 	uni.navigateTo({
			// 		url:''
			// 	})
			// },
			
			
			toMaintenancetask(){
					// 维修任务
				uni.navigateTo({
					url:'/pages/repair-tasks/maintenancetask/maintenancetask'
				})
			},
			// toVerifyRecord(){
			// 		// 评价管理
			// 	uni.navigateTo({
			// 		url:''
			// 	})
			// },
			// toVerifyRecord(){
			// 		// 商户资料
			// 	uni.navigateTo({
			// 		url:''
			// 	})
			// },
			// toVerifyRecord(){
			// 		// 活动发布
			// 	uni.navigateTo({
			// 		url:''
			// 	})
			// },
			
		}
	}
</script>

<style scoped>
	.headCss {
		background-color: #3385fd;
		width: 750rpx;
		height: 300rpx;
		position: fixed;

	}

	.headText {
		background-color: #fff;
		border-radius: 20rpx;
		width: 710rpx;
		margin-left: 20rpx;
		position: relative;
		top: 160rpx;
	}

	.avatar {
		margin-left: 30rpx;
		width: 120rpx;
		height: 120rpx;
		border-radius: 50%;

	}

	.avatar>image {
		width: 120rpx;
		height: 120rpx;
		border-radius: 50%;
	}

	.name {
		color: aliceblue;
		font-size: 32rpx;
		margin-left: 20rpx;
	}

	.saoma {
		/* border: 1rpx solid black; */
		text-align: center;
		width: 50%;
	}

	.saoma:nth-child(1) {
		border-right: 1rpx solid #c4c4c4;
	}

	.saoma>image {
		width: 80rpx;
		height: 80rpx;
		margin-bottom: 20rpx;
	}

	.name2 {
		font-size: 32rpx;
	}

	.headDiv {
		display: flex;
		justify-content: center;
		padding: 60rpx;
	}

	.iconItems {
		padding: 20rpx;
		display: flex;
	}

	.iconItem {
		width: 120rpx;
		height: 150rpx;
		margin: auto;
	}

	.iconImg {
		background-color: #1fcaff;
		width: 100rpx;
		height: 100rpx;
		border-radius: 50rpx;
		margin-left: 10rpx;
	}

	.iconImg>image {
		width: 50rpx;
		height: 50rpx;
		border-radius: 50%;
		margin: 25rpx;
	}

	.iconText {
		margin-top: 10rpx;
	}

	.buttomText {
		display: flex;
		align-items: center;
		padding: 20rpx;
		/* border: 1rpx solid red;1 */

	}

	.butLeft>image {
		width: 30rpx;
		height: 30rpx;
		margin-right: 10rpx;
	}

	.butLeft {
		font-size: 32rpx;
		font-weight: 500;
	}

	.butRight {
		color: orangered;
		font-size: small;
		/* border: 1rpx solid black; */
		position: absolute;
		right: 20rpx;
	}

	.div-line {
		width: 670rpx;
		margin: 0rpx 20rpx 20rpx 20rpx;
		height: 10rpx;
		background-color: #f7f7f7;
		border-radius: 10rpx;
	}

	.message {
		display: flex;
		justify-content: center;
		align-items: center;
		margin: auto;
		margin: 0rpx 20rpx 20rpx 10rpx;
	}

	.message>view {
		/* border: 1rpx solid red; */
		text-align: center;
		margin-bottom: 20rpx;
		/* width: 30%; */
	}

	.message>view:nth-child(1) {
		width: 20%;
	}

	.message>view:nth-child(2) {
		width: 40%;
	}

	.message>view:nth-child(3) {
		width: 40%;
	}



	.msg {
		display: flex;
		justify-content: center;
		align-items: center;
		margin: auto;
		margin: 0rpx 20rpx 20rpx 10rpx;
		border-bottom: 1rpx solid #999999;
	}

	.msg>view {
		font-size: small;
		color: #999999;
		/* border: 1rpx solid red; */
		text-align: center;
		margin-bottom: 20rpx;
		/* width: 30%; */
	}

	.msg>view:nth-child(1) {
		width: 20%;
	}

	.msg>view:nth-child(2) {
		width: 40%;
	}

	.msg>view:nth-child(3) {
		width: 40%;
	}

	.msg:last-child {
		border-bottom: none;
	}
</style>